package com.JQ;

import java.util.Arrays;

public class TestArrays {
    public static void main(String[] args) {
        Student[] arr=new Student[3];
        arr[0]=new Student("张三",66);
        arr[1]=new Student("李四",80);
        arr[2]=new Student("王五",90);
        Arrays.sort(arr,(s1,s2)-> s2.getSorce()-s1.getSorce());
        for (Student student : arr) {
            System.out.println(student);
        }
    }
}
